@import '../../styles/variables';

.effects-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: @background-color;
  border-right: 1px solid @border-color;

  .category-tabs {
    display: flex;
    border-bottom: 1px solid @border-color;
    background: @background-color-light;

    .category-tab {
      display: flex;
      align-items: center;
      gap: @spacing-xs;
      padding: @spacing-sm @spacing-md;
      border: none;
      background: transparent;
      color: @text-color-secondary;
      cursor: pointer;
      transition: all 0.2s ease;
      border-bottom: 2px solid transparent;

      &:hover {
        color: @text-color;
        background: @background-color;
      }

      &.active {
        color: @primary-color;
        border-bottom-color: @primary-color;
        background: @background-color;
      }

      svg {
        flex-shrink: 0;
      }
    }
  }

  .effects-list {
    flex: 1;
    overflow-y: auto;
    padding: @spacing-md;

    .effect-item {
      background: @white;
      border: 1px solid @border-color;
      border-radius: @border-radius;
      margin-bottom: @spacing-md;
      overflow: hidden;
      transition: all 0.2s ease;

      &:hover {
        border-color: @primary-color;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      }

      .effect-header {
        display: flex;
        align-items: center;
        padding: @spacing-md;
        gap: @spacing-md;

        .effect-icon {
          width: 40px;
          height: 40px;
          background: @primary-color-light;
          border-radius: @border-radius;
          display: flex;
          align-items: center;
          justify-content: center;
          flex-shrink: 0;

          svg {
            color: @primary-color;
          }
        }

        .effect-info {
          flex: 1;

          .effect-name {
            font-weight: 600;
            color: @text-color;
            margin: 0 0 @spacing-xs;
            font-size: @font-size-base;
          }

          .effect-description {
            color: @text-color-secondary;
            font-size: @font-size-sm;
            margin: 0;
            line-height: 1.4;
          }
        }

        .add-effect-btn {
          padding: @spacing-xs @spacing-sm;
          background: @primary-color;
          color: @white;
          border: none;
          border-radius: @border-radius-sm;
          cursor: pointer;
          font-size: @font-size-sm;
          transition: all 0.2s ease;

          &:hover:not(:disabled) {
            background: @primary-color-dark;
          }

          &:disabled {
            background: @disabled-color;
            cursor: not-allowed;
            opacity: 0.6;
          }
        }
      }

      .effect-preview {
        padding: @spacing-md;
        border-top: 1px solid @border-color;
        background: @background-color-light;

        .effect-parameter {
          display: flex;
          align-items: center;
          gap: @spacing-sm;
          margin-bottom: @spacing-sm;

          &:last-child {
            margin-bottom: 0;
          }

          .parameter-label {
            font-size: @font-size-sm;
            color: @text-color-secondary;
            min-width: 60px;
          }

          .parameter-slider {
            flex: 1;
            height: 4px;
            background: @border-color;
            border-radius: 2px;
            outline: none;
            appearance: none;

            &::-webkit-slider-thumb {
              appearance: none;
              width: 16px;
              height: 16px;
              background: @primary-color;
              border-radius: 50%;
              cursor: pointer;
            }

            &::-moz-range-thumb {
              width: 16px;
              height: 16px;
              background: @primary-color;
              border-radius: 50%;
              cursor: pointer;
              border: none;
            }
          }

          .parameter-value {
            font-size: @font-size-sm;
            color: @text-color;
            min-width: 30px;
            text-align: center;
            font-family: @font-family-mono;
          }
        }
      }
    }
  }
}

.transitions-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: @background-color;

  .panel-header {
    padding: @spacing-md;
    border-bottom: 1px solid @border-color;
    background: @background-color-light;

    .panel-title {
      font-size: @font-size-lg;
      font-weight: 600;
      color: @text-color;
      margin: 0 0 @spacing-xs;
    }

    .panel-description {
      font-size: @font-size-sm;
      color: @text-color-secondary;
      margin: 0;
    }
  }

  .transitions-list {
    flex: 1;
    overflow-y: auto;
    padding: @spacing-md;

    .transition-item {
      background: @white;
      border: 1px solid @border-color;
      border-radius: @border-radius;
      margin-bottom: @spacing-md;
      overflow: hidden;
      transition: all 0.2s ease;

      &:hover {
        border-color: @primary-color;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      }

      .transition-header {
        display: flex;
        align-items: center;
        padding: @spacing-md;
        gap: @spacing-md;

        .transition-icon {
          width: 48px;
          height: 48px;
          background: @primary-color-light;
          border-radius: @border-radius;
          display: flex;
          align-items: center;
          justify-content: center;
          flex-shrink: 0;

          svg {
            color: @primary-color;
          }
        }

        .transition-info {
          flex: 1;

          .transition-name {
            font-weight: 600;
            color: @text-color;
            margin: 0 0 @spacing-xs;
            font-size: @font-size-base;
          }

          .transition-description {
            color: @text-color-secondary;
            font-size: @font-size-sm;
            margin: 0 0 @spacing-xs;
            line-height: 1.4;
          }

          .transition-duration {
            display: flex;
            align-items: center;
            gap: @spacing-xs;
            font-size: @font-size-xs;
            color: @text-color-secondary;

            svg {
              width: 12px;
              height: 12px;
            }
          }
        }

        .add-transition-btn {
          padding: @spacing-xs @spacing-sm;
          background: @primary-color;
          color: @white;
          border: none;
          border-radius: @border-radius-sm;
          cursor: pointer;
          font-size: @font-size-sm;
          transition: all 0.2s ease;

          &:hover:not(:disabled) {
            background: @primary-color-dark;
          }

          &:disabled {
            background: @disabled-color;
            cursor: not-allowed;
            opacity: 0.6;
          }
        }
      }

      .transition-content {
        .transition-preview {
          position: relative;
          height: 80px;
          background: @background-color;
          border-top: 1px solid @border-color;

          .preview-clips {
            display: flex;
            height: 100%;

            .preview-clip {
              flex: 1;
              height: 100%;

              &.preview-clip-a {
                background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
              }

              &.preview-clip-b {
                background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
              }
            }
          }

          .transition-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
          }
        }

        .transition-parameters {
          padding: @spacing-md;
          border-top: 1px solid @border-color;

          .transition-parameter {
            display: flex;
            align-items: center;
            gap: @spacing-sm;
            margin-bottom: @spacing-sm;

            &:last-child {
              margin-bottom: 0;
            }

            .parameter-label {
              font-size: @font-size-sm;
              color: @text-color-secondary;
              min-width: 80px;
            }

            .parameter-slider {
              flex: 1;
              height: 4px;
              background: @border-color;
              border-radius: 2px;
              outline: none;
              appearance: none;

              &::-webkit-slider-thumb {
                appearance: none;
                width: 16px;
                height: 16px;
                background: @primary-color;
                border-radius: 50%;
                cursor: pointer;
              }

              &::-moz-range-thumb {
                width: 16px;
                height: 16px;
                background: @primary-color;
                border-radius: 50%;
                cursor: pointer;
                border: none;
              }
            }

            .parameter-select {
              flex: 1;
              padding: @spacing-xs;
              border: 1px solid @border-color;
              border-radius: @border-radius-sm;
              background: @white;
              font-size: @font-size-sm;

              &:focus {
                outline: none;
                border-color: @primary-color;
              }
            }

            .parameter-value {
              font-size: @font-size-sm;
              color: @text-color;
              min-width: 30px;
              text-align: center;
              font-family: @font-family-mono;
            }
          }
        }
      }
    }
  }

  .applied-transitions {
    padding: @spacing-md;
    border-top: 1px solid @border-color;
    background: @background-color-light;

    .applied-title {
      font-size: @font-size-base;
      font-weight: 600;
      color: @text-color;
      margin: 0 0 @spacing-sm;
    }

    .applied-list {
      // 已应用转场的样式
    }
  }
}
